﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace com.ReinforceLab.AudioModem
{
    public interface IAudioSource
    {
        /// <summary>
        /// Audio physical layer uses this method to set received waveforms.
        /// </summary>
        /// <param name="waveform">received audio waveform. array length should be audio phy. buffer length.</param>
        void InSignal(short[] waveform, int validLength);

        /// <summary>
        /// Audio physical layer uses this method to get out-waveform
        /// </summary>
        /// <param name="validLength">available data length of the buffer.</param>
        /// <returns>data buffer</returns>
        short[] OutSignal(out int validLength);
    }
}
